/**
 * @file weight.h
 * @brief 
 * @author xuesong (wenshaoliu@foxmail.com)
 * @version 1.0
 * @date 2024-11-06
 * 
 * @copyright Copyright (c) 2024  by xuesong
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version <th>Author  <th>Description
 * <tr><td>2024-11-06     <td>1.0     <td>xuesong   <td>内容
 * </table>
 */
#ifndef __S_WEIGHT_H_
#define __S_WEIGHT_H_

#include "types.h"

typedef struct
{
    union
    {
        struct
        {
            unsigned char zeroOk : 1;        // zero ok
            unsigned char Load : 1;          // Auto weight up load weight
            unsigned char Negative : 1;      // Auto weight negative
            unsigned char FastScan : 1;      // Fast Weight Scan
            unsigned char ScaleDivision : 1; // Auto Weight Division Flag
            unsigned char UnLoad : 1;        //
            unsigned char Relax : 1;         // 放宽找零
        } Bits;
        uint8_t Byte;
    } Flag;
    uint8_t StableCnt;
    uint8_t SumCount;
    uint8_t LoadCount;
    uint8_t UnLoadCount;
    uint32_t ZeroAdcValue;
    uint32_t WeakUpAdcValue;
    uint32_t lastAdcValue;
    uint32_t SumAdcValue;
} AutoWeightWeakUp_t;

#endif
